/**
 * @see https://umijs.org/docs/max/access#access
 * */
import { useModel } from 'umi';

export default () => {
  const { initialState } = useModel('@@initialState')
  const { currentUser } = initialState
  return {
    // 1代表管理员
    canAdmin: currentUser && currentUser.userRole === 1,
  };
}
